import { RouteRecordRaw } from "vue-router";

export const menuClassification: {id: number, title: string}[] = [
  {
    id: 0,
    title: '首页'
  },
  {
    id: 1,
    title: '小程序管理'
  },
  {
    id: 2,
    title: '服务管理'
  },
  {
    id: 3,
    title: '数据管理'
  },
  {
    id: 4,
    title: '充值记录'
  }
]
export const frameIn: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Layouts',
    redirect: '/home',
    component: () => import('../layouts/index.vue'),
    children: [
      {
        path: '/home',
        name: 'Home',
        component: () => import('../views/home/index.vue'),
        meta: {
          title: '首页',
          isAuth: true,
          clsId: 0
        }
      },
      {
        path: '/wxuserAdmin',
        name: 'WxUserAdmin',
        component: () => import('../views/wxUserAdmin/index.vue'),
        meta: {
          title: '小程序用户管理',
          isAuth: true,
          clsId: 1
        }
      },
      {
        path: '/wxAppConfigAdmin',
        name: 'WXAppConfigAdmin',
        component: () => import('../views/wxAppConfigAdmin/index.vue'),
        meta: {
          title: '小程序配置管理',
          isAuth: true,
          clsId: 1
        }
      },
      {
        path: '/personalChannelAdmin',
        name: 'PersonalChannelAdmin',
        component: () => import('../views/personalChannelAdmin/index.vue'),
        meta: {
          title: '个人车源管理',
          isAuth: true,
          clsId: 3
        }
      },
      {
        path: '/newCarClueAdmin',
        name: 'NewCarClueAdmin',
        component: () => import('../views/newCarClueAdmin/index.vue'),
        meta: {
          title: '新车线索管理',
          isAuth: true,
          clsId: 3
        }
      },
      {
        path: '/peerCarAdmin',
        name: 'PeerCarAdmin',
        component: () => import('../views/peerCarAdmin/index.vue'),
        meta: {
          title: '同行车源管理',
          isAuth: true,
          clsId: 3
        }
      },
      {
        path: '/coinServiceAdmin',
        name: 'CoinServiceAdmin',
        component: () => import('../views/coinServiceAdmin/index.vue'),
        meta: {
          title: '积分服务管理',
          isAuth: true,
          clsId: 2
        }
      },
      {
        path: '/vipServiceAdmin',
        name: 'VipServiceAdmin',
        component: () => import('../views/vipServiceAdmin/index.vue'),
        meta: {
          title: '会员服务管理',
          isAuth: true,
          clsId: 2
        }
      },
      {
        path: '/lockServiceAdmin',
        name: 'LockServiceAdmin',
        component: () => import('../views/lockServiceAdmin/index.vue'),
        meta: {
          title: '锁定服务管理',
          isAuth: true,
          clsId: 2
        }
      },
      {
        path: '/rechargeRecordAdmin',
        name: 'RechargeRecordAdmin',
        component: () => import('../views/rechargeRecordAdmin/index.vue'),
        meta: {
          title: '充值记录',
          isAuth: true,
          clsId: 4
        }
      }
    ]
  }
]

export const frameOut: Array<RouteRecordRaw> = [
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/login/index.vue')
  }
]

export default [
  ...frameIn,
  ...frameOut
]